import request from '/@/utils/request';

//---- 用户管理 -----
// 列表
export const fetchUserList =  (params?: object) => {
	return request({
		url: '/user',
		method: 'get',
		params,
	});
}

export const fetchUserExport =  (data?: object) => {
	return request({
		url: '/user/export',
		method: 'post',
		responseType: "blob",
		data,
	});
}

export const fetchUserDetail =  (params?: object) => {
	return request({
		url: '/user/detail',
		method: 'get',
		params,
	});
}

// 经销商认证
// 统计
export const fetchDealerAuthStatics =  (params?: object) => {
	return request({
		url: '/dealer/count',
		method: 'get',
		params,
	});
}

// 列表
export const fetchDealerAuthList =  (params?: object) => {
	return request({
		url: '/dealer',
		method: 'get',
		params,
	});
}

// 导出
export const fetchExportDealerAuth =  (params?: object) => {
	return request({
		url: '/dealer/export',
		method: 'get',
		params,
		responseType: "blob",
	});
}




// 审核
export const fetchDealerAuthAudit = (data:any) => {
	return request({
		url: '/dealer/check',
		method: 'post',
		data,
	});
};
